home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / prog / asm_0_m.arj / DP16.DOC < prev    next >
Text File  |  1987-02-24  |  12KB  |  426 lines

  1.  
  2.  
  3.  
  4.  
  5.                  DataPath 1.6
  6.  
  7.                   by
  8.  
  9.                  Bruce Dubbs
  10.                  GDC Software
  11.                122 Valencia Dr.
  12.                Universal City, TX 78148
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                DataPath Topics
  21.  
  22.         Purpose.....................................2
  23.  
  24.         System Requirements.........................2
  25.  
  26.         How to use DataPath.........................2
  27.  
  28.         Examples....................................3
  29.  
  30.         Features....................................5
  31.  
  32.         Technical Details...........................6
  33.  
  34.         Limitations.................................7
  35.  
  36.         References..................................7
  37.  
  38.         Disclaimer..................................8
  39.  
  40.         Modification History........................9
  41.  
  42.         Suggestions for use........................10
  43.  
  44.  
  45. Page 2                        DataPath - GDC Software
  46.  
  47.  
  48.  
  49.                    Purpose
  50.  
  51.     DataPath is used to specify directories, other than the current
  52. one, to be searched by executing programs, in the event that a file
  53. that needs to be read cannot be found in the current directory.
  54.  
  55.  
  56.              System Requirements
  57.  
  58.     DataPath requires 2327 bytes of disk space ( 5 512-byte sectors).
  59. It becomes memory resident the first time it is run and increases the
  60. size of the operating system by 1456 bytes.  It will run on any com-
  61. puter using the MS-DOS or PC-DOS operating systems version 2.0 or
  62. higher.
  63.  
  64.  
  65.              How to use DataPath
  66.  
  67.  
  68.     Entry Form
  69.  
  70.     DATAPATH [d:][pathname [;[d:]pathname]...][/x]
  71.  
  72.     where  'd' is the letter of the designated disk drive; and
  73.         pathname' is a sequence of characters of the form:
  74.  
  75.         [\][directory][\directory...][\]
  76.  
  77.         Optionally you may use the MS-DOS shorthand notation
  78.         shown below in lieu of 'directory':
  79.  
  80.         .    MS-DOS uses this shorthand symbol to indicate the name
  81.         of the current working directory.  MS-DOS automati-
  82.         cally creates this entry when a directory is made.
  83.  
  84.         ..    MS-DOS uses this shorthand symbol to indicate the name
  85.         of the current directory's parent directory.  MS-DOS
  86.         automatically creates this entry when a directory is
  87.         made.
  88.  
  89.         Note: The two shorthand symbols do not exist in the root
  90.         directory.
  91.  
  92.         /x is one or more of the following switches:
  93.  
  94.           /V, verbose mode, or
  95.           /Q, quiet mode, or
  96.           /R, allow file opens for read only, or
  97.           /W, allow file opens for read or write, or
  98.           /C, clear the current DataPath, or
  99.           /H, display help information.
  100.  
  101.  
  102. Page 3                        DataPath - GDC Software
  103.  
  104.     Example 1
  105.  
  106.         If you are in directory \DATA and you want to use your
  107.      copy of dBASE II which is in subdirectory \DBASE to work on
  108.      data in your current directory, use the following sequence of
  109.      commands:
  110.  
  111.         DATAPATH \DBASE<return>
  112.         PATH \DBASE<return>
  113.         DBASE<return>
  114.  
  115.     Example 2
  116.  
  117.         If you want to see the current DataPath, type:
  118.  
  119.         DATAPATH<return>
  120.  
  121.         The current DataPath will be displayed.
  122.  
  123.     Example 3
  124.  
  125.         If you want to disable DataPath type:
  126.  
  127.         DATAPATH  /C <return>
  128.  
  129.     Example 4
  130.  
  131.         If you have all your DOS programs on a subdirectory named
  132.      \DOS, Lotus 123 files in a subdirectory named \LOTUS, dBase
  133.      files in a subdirectory named \DBASE, and an editor in a sub-
  134.      directory named \EDITOR, and you want to access any of the
  135.      programs from any subdirectory, use the following sequence:
  136.  
  137.         PATH     \DOS;\LOTUS;\DBASE;\EDITOR
  138.         DATAPATH \DOS;\LOTUS;\DBASE;\EDITOR
  139.  
  140.         Note: This configuration will add a noticeable time delay
  141.      to most applications that read files and to COMMAND.COM find-
  142.      ing most programs. Using batch files to set PATH and DataPath
  143.      is a much cleaner and quicker method.
  144.  
  145. Page 4                        DataPath - GDC Software
  146.  
  147.     Example 5
  148.  
  149.         If your programs are on disk A and your data is on disk B,
  150.      use this sequence:
  151.  
  152.         PATH A:
  153.         DATAPATH A:
  154.  
  155.         or alternatively to search both disks from either loca-
  156.      tion:
  157.  
  158.         PATH A:;B:
  159.         DATAPATH A:;B:
  160.  
  161.         This example assumes that all files on drives A and B are
  162.      in the root directory.  Subdirectories are not of great use
  163.      on 360K floppy disks, however, DataPath will work properly on
  164.      floppy diskettes.
  165.  
  166.     Example 6
  167.  
  168.         You want to enable spelling dictionary files on subdirec-
  169.      tory \WORD to be accessed when opened for writing and you
  170.      want to suppress the DataPath messages:
  171.  
  172.         DATAPATH C:\WORD/W/Q
  173.  
  174.         Messages will remain suppressed until verbose mode is
  175.      reset.
  176.  
  177.     Example 7
  178.  
  179.         You want to reset DataPath to search the \BIN subdirec-
  180.      tory, disable opens for read, and reset verbose mode.
  181.  
  182.         DATAPATH C:\BIN/V/R
  183.  
  184.     Example 8
  185.  
  186.         You want to display quick help information about the data
  187.      path and its switches.
  188.  
  189.         DATAPATH /h
  190.  
  191.         The data path will not be updated if the /h switch is pre-
  192.      sent.
  193.  
  194.  
  195. Page 5                        DataPath - GDC Software
  196.  
  197.                    Features
  198.  
  199.         DataPath supports the following features:
  200.  
  201.         1.    DataPath will ignore invalid drives or path specifica-
  202.      tions.
  203.  
  204.         2.    DataPath has a very small size.  When installed, it
  205.      uses only 1440 bytes of RAM.
  206.  
  207.         3.    DataPath will skip over a drive listed in the DataPath
  208.      if the drive door is left open.  You will have to wait for
  209.      the disk to time out, however.  You will get the normal
  210.      Abort, Retry, Ignore command if the default drive door is
  211.      open.
  212.  
  213.         4.    THE SOURCE TO DataPath IS RELEASED TO THE PUBLIC
  214.      DOMAIN!
  215.  
  216.         5.    DataPath works on any MS-DOS or PC-DOS system. (Ver-
  217.      sion 2.0 or higher.)  It is not dependent on hardware.
  218.  
  219.         6.    DataPath is compatible with CP/M style function calls
  220.      in MS-DOS for older programs such as dBase II.
  221.  
  222. Page 6                        DataPath - GDC Software
  223.  
  224.                    Technical Details
  225.  
  226.         DataPath was written in assembly language and was optim-
  227.      ized for both small size and fast operation.  The source for
  228.      the program is in the file DP16.ASM.
  229.  
  230.         DataPath works by intercepting three different function
  231.      calls to the operating system.  These are 'OPEN', 'FILE
  232.      SIZE', and 'OPEN FILE HANDLE'.  The usual call within MS-DOS
  233.      now is 'OPEN FILE HANDLE', but some programs use the older
  234.      functions.  Lotus 1-2-3 Version 1A, for instance, uses 'FILE
  235.      SIZE' to open a file.
  236.  
  237.         DataPath also intercepts older CP/M style call to the
  238.      operating system, converts the calls to MS-DOS calls, and
  239.      executes accordingly. The dBase II program uses this method.
  240.  
  241.         DataPath uses the 256 byte PSP (program segment prefix)
  242.      that is left resident when the program installs itself.  It
  243.      uses the space for storing the DataPath and for working
  244.      space.
  245.  
  246.  
  247.  
  248.         The program logic for DataPath is as follows:
  249.  
  250.         1.    If DataPath is not interested in the function, pass it
  251.      to DOS undisturbed.
  252.  
  253.         2.    Try the function.  If successful, return to the call-
  254.      ing program.
  255.  
  256.         3.    If the file is to be opened for writing and the /R
  257.      option (open for read only) is in effect, return.
  258.  
  259.         4.    If the path of the desired file is specified, return.
  260.      If the program knows enough to specify a path, DataPath will
  261.      not interfere. DataPath WILL search if only the disk drive is
  262.      specified.
  263.  
  264.         5.    Search for the file along the DataPath.  If not found,
  265.      return the error code found in step 2.  If found, complete
  266.      the function and return to the calling program.
  267.  
  268. Page 7                        DataPath - GDC Software
  269.  
  270.  
  271.                   Limitations
  272.  
  273.         Listed below are the known limitations of DataPath:
  274.  
  275.         1.    The maximum length of the DataPath string is 125 char-
  276.      acters. This is due to the 127 character limitation MS-DOS
  277.      puts on input strings.
  278.  
  279.         2.    DataPath cannot be uninstalled without rebooting the
  280.      system. This should not be a problem because of its small
  281.      size.    DataPath can be disabled by clearing the DataPath.
  282.  
  283.         3. The DataPath will not accept wildcards.    They will be
  284.      ignored.
  285.  
  286.         4.    DataPath will not create aliases for pathnames.
  287.  
  288.         5.    DataPath will not automatically search subdirectories
  289.      beneath the specified directory.
  290.  
  291.  
  292.                   References
  293.  
  294.         The following magazine article contains information on
  295.      utilities that do the same function as DataPath:
  296.  
  297.         PC Tech Journal - April 1985 - pp 139-145.
  298.         "File Search Help for PC-DOS" by Arthur A. Gleckler
  299.  
  300.  
  301.         The following  magazine article contains general informa-
  302.      tion on resident utilities:
  303.  
  304.         PC World - June 1986 - pp 270-284.
  305.         "Battle for the Background" by Bruce Owen
  306.  
  307.  
  308.         The following programs perform the same basic function as
  309.      DataPath.  They contain different features, however their
  310.      basic intent is the same as DataPath.
  311.  
  312.         DPath30   - Public Domain - No source
  313.  
  314.         FilePath  - Commercial  - $ 37.50
  315.         Scout     - Commercial  - $ 29.95
  316.         SuperPATH - Commercial  - $ 39.95
  317.         EasyPath  - Commercial  - $100.00
  318.  
  319. Page 8                        DataPath - GDC Software
  320.  
  321.  
  322.                   Disclaimer
  323.  
  324.         There is no copyright associated with this program.  It
  325.      is, however, intended for private noncommercial distribution
  326.      only.    You may make copies freely and use the source code in
  327.      any manner that you wish. Please do not charge anyone for
  328.      this program.    It is free.
  329.  
  330.         This software is not warranted in any manner.  No guaran-
  331.      tee is made that the program operates as it was designed.  I
  332.      will not be liable for any damages that may occur by using
  333.      this program.    If you use the program, you agree to this.
  334.  
  335.         Any comments, suggestions, or criticisms are welcome.
  336.      Examples of conflicts with other memory resident utilities or
  337.      the inability of DataPath to work with a particular program
  338.      are especially welcome.  I can be normally be reached at the
  339.      following:
  340.         Telstar Bulletin Board (512) 822-8882
  341.         SAHUG Bulletin Board   (512) 341-0586
  342.         Compuserve ID: 72330,123
  343.  
  344.         If you distribute this program, or a modification of this
  345.      program, it would be nice for you to acknowledge the source.
  346.  
  347.                   Bruce Dubbs
  348.                  GDC Software
  349.                    122 Valencia Dr.
  350.                Universal City, TX 78148
  351.                    September 2, 1986
  352.  
  353.  
  354. Page 9                        DataPath - GDC Software
  355.  
  356.  
  357.                  Modification History
  358.  
  359.         Version 1.0 - September 2, 1986 - Original release.
  360.  
  361.         Version 1.1 - September 18, 1986 - Add /Q, /V, /W, and /R
  362.               switches.  Allow DataPath to be searched if
  363.               disk drive is specified in ASCIIZ file spe-
  364.               cification.
  365.  
  366.         Version 1.2 - October 9, 1986 - Add /H switch.  Improve
  367.               memory resident check for compatability with
  368.               other GDC memory resident utilities.
  369.  
  370.         Version 1.3 - February 3, 1987 - Check for and remove illegal
  371.               characters in the DataPath.  Illegal characters
  372.               are:    $"[]*?+=<>
  373.  
  374.         Version 1.5 - February 17, 1987 - Add /C switch.  Ignore all
  375.               blanks and non-printing characters.  Check for
  376.               illegal switches.
  377.  
  378.         Version 1.6 - February 24, 1987 - Fix bug that returned wrong
  379.               error code for zero length file.
  380.  
  381. Page 10                     DataPath - GDC Software
  382.  
  383.  
  384.  
  385.               Suggestions for use
  386.  
  387.         The best way to use DataPath is to organize your disk
  388.      subdirectories such that the executable and supporting files
  389.      are on a different subdirectory than the data files.  The
  390.      best example is WordStar.  If you put the WordStar executable
  391.      and overlays in a subdirectory 'WORDSTAR' and have your data
  392.      files in other subdirectories, the following benefits occur:
  393.  
  394.      1.  You can execute WordStar from ANY subdirectory.
  395.      2.  You do not have to look for your data files intermixed
  396.          with executable and overlay files.
  397.  
  398.         To do this, set the following to execute in the
  399.      AUTOEXEC.BAT file that executes when you boot MS-DOS.
  400.  
  401.         PATH \WORDATAR
  402.         DATAPATH \WORDSTAR
  403.         WS
  404.  
  405.         This procedure can be generalized to any set of programs
  406.      and overlays.    To keep from setting multiple paths for all
  407.      searches, a set of batch files can be created such as the
  408.      following file that executes dBase III.
  409.  
  410.  
  411.      DO.BAT:    echo off
  412.             datapath c:\dbase
  413.             path c:\dbase
  414.             dbase %1
  415.             path c:\bin;c:\batch
  416.             datapath c:\bin
  417.  
  418.         This example assumes the dBase executable files are in the
  419.      directory \dbase, the batch file DO.BAT is in the directory
  420.      \batch, the MS-DOS executable files are in \bin and the data
  421.      for dBase are in the current directory.
  422.  
  423.      For more information on batch files, consult the MS-DOS
  424.      manual.
  425.  
  426.